package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.kly.user.db.dao.UserTaskJobDao;
import com.kly.user.db.entity.UserTaskJobEntity;
import com.kly.user.task.enums.TaskTypeEnum;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
* User: linqu
* Date: 2023-07-01
* Time: 11:31:20.889
*/

@Repository
public class UserTaskJobDaoImpl extends AbstractBaseMapper<UserTaskJobEntity> implements UserTaskJobDao {

    @Override
    public List<UserTaskJobEntity> queryUserTask(TaskTypeEnum typeEnum, Integer executeTimes) {
        Map<String, Object> params = Maps.newHashMap();
        params.put("taskType", typeEnum.getCode());
        params.put("executeTimes", executeTimes);
        return getSqlSession().selectList(this.getStatement("queryUserTask"), params);
    }
}